package book.service.impl;

import book.dao.roleDao;
import book.entity.role;
import book.entity.role_privileges;
import book.service.RoleServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServicesImpl implements RoleServices{

    @Autowired
    roleDao role;

    @Override
    public int getCount() {
        return role.getCount();
    }

    @Override
    public void insert(role_privileges rp) {

    }

    @Override
    public void delete(int id) {
        role.deleteEntity(id);
    }

    @Override
    public role getById(int id) {
        return role.getById(id);
    }

    @Override
    public List<role> getAll() {
        return role.getAll();
    }

    @Override
    public void insertRole(role r) {
        role.insertEntity(r);
    }
}
